﻿using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;

namespace VoxelBlock.VoxelInput
{
	public class VoxelInputInfo {

		public Color32[] Colors;

		public int SizeX, SizeY, SizeZ;

        public float minX, minY, minZ;

        public byte[] Version = {0,0};

		public int[, ,] Voxels;

        public int mVoxelNum = -1;
        
		public int VoxelNum 
        {
			get {
                if (mVoxelNum == -1)
                {
                    mVoxelNum = 0;
				    for (int i = 0; i < SizeX; i++) {
					    for (int j = 0; j < SizeY; j++) {
						    for (int k = 0; k < SizeZ; k++) {
							    if (Voxels[i, j, k] != 0) {
                                    mVoxelNum++;
							    }
						    }
					    }
				    }
                }
                return mVoxelNum;
			}
		}

	}
	
}